#include <QCoreApplication>
#include <iostream>
using namespace std;

int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
    int day;
    int mounth;
    cout<<"Enter day: ";
    cin>>day;
    cout<<"Enter mounth: ";
    cin>>mounth;
    switch(day)
    {
    case 1: day=31;break;
    default: day=day-1;
    }
    switch(mounth)
    {
    case 1: mounth=12;break;
    }
    cout<<day<<"."<<mounth;
    return a.exec();
}
